package com.xoa.controller.h5AppLogin;

import com.xoa.controller.login.loginController;
import com.xoa.model.users.Users;
import com.xoa.util.ToJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("/weixinPublic")
public class WeixinPublicController {

    @Autowired
    loginController login;

    @RequestMapping("/weixinNoticeDetail")
    public String weixinNoticeDetail(String byName, String flowId, String flowStep, String flowPrcs, String tabId, String tableName,
                                     String runId, String prcsId, String opFlag, HttpServletRequest request, HttpServletResponse response) {
        try {
            ToJson<Users> toJson = login.loginEnter(byName, "", "1001", "mobile", null, request, response, 1);
            if(!toJson.isFlag()) {
                return toJson.getMsg();
            }
        } catch (Exception e) {
            e.printStackTrace();
            return e.getMessage();
        }
        return "/document/getSuperiorformh5?flowId="+flowId+"&flowStep="+flowStep+
                "&flowPrcs="+flowPrcs+"&tabId="+tabId+"&tableName="+tableName+"&runId="+runId+"&prcsId="+prcsId+"&isNomalType=false&opFlag="+opFlag+"&lang=zh_CN&backType=2";
    }

}
